package com.slg.android.manyanime;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.webkit.WebView;
import android.widget.TextView;

import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;
import com.lidroid.xutils.view.annotation.event.OnClick;


public class AdActivity extends FragmentActivity {
    @ViewInject(R.id.ad_webView)
    private WebView webView;
    @ViewInject(R.id.common_title_title_textView)
    private TextView title;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_ad);
        ViewUtils.inject(this);
        Intent intent = getIntent();
        String titleString = intent.getStringExtra("title");
        String url = intent.getStringExtra("url");
        Log.d("url","  "+url);
        Log.d("title","  "+titleString);
        title.setText(titleString);
        webView.loadUrl(url);

    }

    @OnClick({R.id.common_title_back_imageView})
    public void onClick(View view) {
        int id = view.getId();
        switch (id) {
            case R.id.common_title_back_imageView:
                finish();
                break;
        }
    }


}
